import Vue from 'vue'
import Router from 'vue-router'


const screenIndex = r => require.ensure([], () => r(require('../components/screenIndex.vue')), 'screenIndex') //首页
const policyCalculator  = r => require.ensure([], () => r(require('../components/policyCalculator.vue')), 'policyCalculator ') //政策计算器
const policyResources  = r => require.ensure([], () => r(require('../components/policyResources.vue')), 'policyResources ') //政策资源
const enterpriseService  = r => require.ensure([], () => r(require('../components/enterpriseService.vue')), 'enterpriseService ') //企业办事
const noticeAnnouncement  = r => require.ensure([], () => r(require('../components/noticeAnnouncement.vue')), 'noticeAnnouncement ') //通知公告
const policyThroughTrain  = r => require.ensure([], () => r(require('../components/policyThroughTrain.vue')), 'policyThroughTrain ') //政策直通车
const demandService  = r => require.ensure([], () => r(require('../components/demandService.vue')), 'demandService ') //诉求服务
const register  = r => require.ensure([], () => r(require('../components/register.vue')), 'register ') //注册
const login  = r => require.ensure([], () => r(require('../components/login.vue')), 'login ') //登录

Vue.use(Router)

export default new Router({
	routes: [
    {
      path: '/',
      name: 'screenIndex',
      component: screenIndex,
    },
    //登录
    {
      path: '/login',
      name: 'login',
      component: login
    },
    //注册
    {
      path: '/register',
      name: 'register',
      component: register
    },
    //政策计算器
    {
      path: '/policyCalculator',
      name: 'policyCalculator',
      component: policyCalculator
    },
    //政策资源
    {
      path: '/policyResources',
      name: 'policyResources',
      component: policyResources
    },
    //企业办事
    {
      path: '/enterpriseService',
      name: 'enterpriseService',
      component: enterpriseService
    },
    //通知公告
    {
      path: '/noticeAnnouncement',
      name: 'noticeAnnouncement',
      component: noticeAnnouncement
    },
    //政策直通车
    {
      path: '/policyThroughTrain',
      name: 'policyThroughTrain',
      component: policyThroughTrain
    },
    //诉求服务
    {
      path: '/demandService',
      name: 'demandService',
      component: demandService
    },


	]
})
